package com.xxh.dasongapp.common.param;

import com.xxh.dasongapp.common.validgroup.Insert;
import com.xxh.dasongapp.common.validgroup.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jdk.nashorn.internal.ir.annotations.Ignore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="用户参数",description="用户参数")
public class UserPARAM implements Serializable {
    private static final long serialVersionUID = 1L;

    @NotBlank(message = "id不能为空", groups = Update.class)
    @ApiModelProperty(value = "用户id(新增可以不传)")
    private String id;

    @NotEmpty(message = "用户名不能为空",groups = Insert.class)
    @ApiModelProperty(value = "用户名（账号）")
    private String username;

    @NotEmpty(message = "密码不能为空",groups = Insert.class)
    @ApiModelProperty(value = "密码")
    private String password;

    @NotEmpty(message = "昵称不能为空",groups = Insert.class)
    @ApiModelProperty(value = "昵称")
    private String name;


    @NotNull(message = "角色权限不能为空",groups = Insert.class)
    @ApiModelProperty(value = "权限（1为管理员，2为普通用户）")
    private Integer roleId;

    @NotNull(message = "用户状态不能为空",groups = Insert.class)
    @ApiModelProperty(value = "状态（0为冻结，1为正常）")
    private Integer status;



}
